package com.ease.web.xwt.component;

import com.ease.web.xwt.vo.XOption;

/**
 * 
 * @author nathanleewei
 * 
 */
public class XReference extends XAbstractComponent {

	/**
	 *
	 */
	private static final long serialVersionUID = -2817263204342436006L;

	protected String proxyName;

	protected XOption option;
	protected String onClick;

	public XReference() {
		super();
	}

	protected String getTemplate() {
		return TEMPLATE_X_REFERENCE;
	}

	public String generate() {
		if (null == this.proxyName) {
			this.proxyName = this.name + "Proxy";
		}
		return super.generate();
	}

	/**
	 * @return Returns the proxyName.
	 */
	public String getProxyName() {
		return proxyName;
	}

	/**
	 * @return Returns the onClick.
	 */
	public String getOnClick() {
		return onClick;
	}

	/**
	 * @param onClick
	 *            The onClick to set.
	 */
	public void setOnClick(String onClick) {
		this.onClick = onClick;
	}

	/**
	 * @param proxyName
	 *            The proxyName to set.
	 */
	public void setProxyName(String proxyName) {
		this.proxyName = proxyName;
	}

	/**
	 * @return Returns the option.
	 */
	public XOption getOption() {
		return option;
	}

	/**
	 * @param option
	 *            The option to set.
	 */
	public void setOption(XOption option) {
		this.option = option;
	}

}
